x86/mm: Reorder locks used by shadow code in anticipation of synchronized p2m lookups
authorAndres Lagar-Cavilla <andres@lagarcavilla.org>
Thu, 2 Feb 2012 12:22:34 +0000 (12:22 +0000)
committerAndres Lagar-Cavilla <andres@lagarcavilla.org>
Thu, 2 Feb 2012 12:22:34 +0000 (12:22 +0000)
commit4b9686b36f778d0c97fc64fad9592a03207aabc8
tree0a548d3af943b12938a3598b1e62d91dccb6f90a
parent6623226237f1c2db19ed5b91b6dca4d1f8a6f8d7
x86/mm: Reorder locks used by shadow code in anticipation of synchronized p2m lookups

Currently, mm-locks.h enforces a strict ordering between locks in the mm
layer lest there be an inversion in the order locks are taken and thus
the risk of deadlock.

Once p2m lookups becoming synchronized, get_gfn* calls take the p2m lock, and a
new set of inversion arises.  Reorder some of the locks in the shadow code so
that even in this case no deadlocks happen.

After this, synchronized p2m lookups are in principle ready to be enabled in
shadow mode.

Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
xen/arch/x86/mm/shadow/common.c
xen/arch/x86/mm/shadow/multi.c